package com.tjetc.repository;

import com.tjetc.domain.ChatHistory;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.HashSet;
import java.util.List;
import java.util.Optional;
@Repository
public interface ChatHistoryDao extends ElasticsearchRepository<ChatHistory,Integer> {






    List<ChatHistory> findAllBySenderIdAndReceiverIdOrderByDate(Integer senderId, Integer receiveId);

   List<ChatHistory> findAllBySenderId(Integer userId);

    List<ChatHistory> findAllByReceiverId(Integer userId);




}
